<template>
  <van-nav-bar title="标题"
               left-text="返回"
               right-text="登录"
               fixed
               left-arrow
               @click-left="onClickLeft"
               @click-right="onClickRight" />
</template>
<script>
import { NavBar, Toast } from 'vant'
export default {
  name: 'app-header',
  components: {
    [NavBar.name]: NavBar
  },
  methods: {
    onClickLeft () {
      Toast('返回');
      this.$router.go(-1)
    },
    onClickRight () {
      this.$router.push('/login')
    }
  }
}
</script>
